package com.algorithm.linesegment;

/**
 * @Author:DOWN
 * @Date:2022/5/5 16:52
 * @Comment:测试用例
 */

public class Test {
    public static void main(String[] arr) {
        Integer[] nums = {19, 2, -3, 5, 9, -23};
        SegmentTree<Integer> segmentTree = new SegmentTree<>(nums, (a, b) -> a + b);
        System.out.println(segmentTree.toString());
        System.out.println(segmentTree.query(3,4));
        System.out.println(segmentTree.query(0,4));
        System.out.println(segmentTree.query(2,4));
    }
}
